﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiShadowParameters : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiShadowParameters(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiShadowParameters obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiShadowParameters()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiShadowParameters(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGiShadowParameters() : this(GlobalsPINVOKE.new_OdGiShadowParameters__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiShadowParameters(OdGiShadowParameters parms) : this(GlobalsPINVOKE.new_OdGiShadowParameters__SWIG_1(OdGiShadowParameters.getCPtr(parms)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiShadowParameters Assign(OdGiShadowParameters parms)
		{
			OdGiShadowParameters result = new OdGiShadowParameters(GlobalsPINVOKE.OdGiShadowParameters_Assign(this.swigCPtr, OdGiShadowParameters.getCPtr(parms)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsEqual(OdGiShadowParameters parms)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_IsEqual(this.swigCPtr, OdGiShadowParameters.getCPtr(parms));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGiShadowParameters parms)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_IsNotEqual(this.swigCPtr, OdGiShadowParameters.getCPtr(parms));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setShadowsOn(bool on)
		{
			GlobalsPINVOKE.OdGiShadowParameters_setShadowsOn(this.swigCPtr, on);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool shadowsOn()
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_shadowsOn(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setShadowType(OdGiShadowParameters.ShadowType typ)
		{
			GlobalsPINVOKE.OdGiShadowParameters_setShadowType(this.swigCPtr, (int)typ);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiShadowParameters.ShadowType shadowType()
		{
			OdGiShadowParameters.ShadowType result = (OdGiShadowParameters.ShadowType)GlobalsPINVOKE.OdGiShadowParameters_shadowType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setShadowMapSize(ushort sz)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_setShadowMapSize(this.swigCPtr, sz);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public ushort shadowMapSize()
		{
			ushort result = GlobalsPINVOKE.OdGiShadowParameters_shadowMapSize(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setShadowMapSoftness(byte soft)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_setShadowMapSoftness(this.swigCPtr, soft);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public byte shadowMapSoftness()
		{
			byte result = GlobalsPINVOKE.OdGiShadowParameters_shadowMapSoftness(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setShadowSamples(ushort nSamples)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_setShadowSamples(this.swigCPtr, nSamples);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public ushort shadowSamples()
		{
			ushort result = GlobalsPINVOKE.OdGiShadowParameters_shadowSamples(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setShapeVisibility(bool bVisibility)
		{
			GlobalsPINVOKE.OdGiShadowParameters_setShapeVisibility(this.swigCPtr, bVisibility);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool shapeVisibility()
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_shapeVisibility(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setExtendedLightShape(OdGiShadowParameters.ExtendedLightShape lightShape)
		{
			GlobalsPINVOKE.OdGiShadowParameters_setExtendedLightShape(this.swigCPtr, (int)lightShape);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiShadowParameters.ExtendedLightShape extendedLightShape()
		{
			OdGiShadowParameters.ExtendedLightShape result = (OdGiShadowParameters.ExtendedLightShape)GlobalsPINVOKE.OdGiShadowParameters_extendedLightShape(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setExtendedLightLength(double dLength)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_setExtendedLightLength(this.swigCPtr, dLength);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double extendedLightLength()
		{
			double result = GlobalsPINVOKE.OdGiShadowParameters_extendedLightLength(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setExtendedLightWidth(double dWidth)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_setExtendedLightWidth(this.swigCPtr, dWidth);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double extendedLightWidth()
		{
			double result = GlobalsPINVOKE.OdGiShadowParameters_extendedLightWidth(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setExtendedLightRadius(double dRadius)
		{
			bool result = GlobalsPINVOKE.OdGiShadowParameters_setExtendedLightRadius(this.swigCPtr, dRadius);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double extendedLightRadius()
		{
			double result = GlobalsPINVOKE.OdGiShadowParameters_extendedLightRadius(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum ShadowType
		{
			kShadowsRayTraced,
			kShadowMaps,
			kAreaSampled
		}

		public enum ExtendedLightShape
		{
			kLinear,
			kRectangle,
			kDisk,
			kCylinder,
			kSphere
		}
	}
}
